home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: id.dtu.dk!news!jl
- From: jl@id.dth.dk (J°rn Lind-Nielsen)
- Subject: Re: Major problem with strings.
- In-Reply-To: rmorin@inforamp.net's message of Mon, 11 Mar 96 06:20:01 GMT
- Message-ID: <JL.96Mar11162442@thyme.id.dth.dk>
- Sender: news@id.dtu.dk (NetNews)
- Organization: Department of Computer Science, The Technical University of
- Denmark
- References: <31438275.72DB@aol2.com> <4i0gn0$5g9@sam.inforamp.net>
- Date: Mon, 11 Mar 1996 21:24:42 GMT
-
-
- In article <4i0gn0$5g9@sam.inforamp.net> rmorin@inforamp.net (Randy Charles Morin) writes:
-
- In article <31438275.72DB@aol2.com>, Neil <neil@aol2.com> wrote:
- >1 char *club="";
- >2 club="/public_html/neil";
- >3 strcat(club,argv[1]+5);
- >4 strcat(club,"/");
-
- No, this just won't do. When you want a '/' slash in C, use two slashes.
- The '/' is also used to denote an escape sequence (for special characters).
- Thus your code should read...
-
- 1 char *club="";
- 2 club="//public_html//neil";
- 3 strcat(club,argv[1]+5);
- 4 strcat(club,"//");
-
-
-
- Now come on .. Do you want a slash or a backslash ??? And it still won't do
- any good. There just ain't room for the additional argv[] characters! You will
- have to allocate some room for it - somewhere.
- --
- ------------------------------------------------------------------------
- From: Jorn Bo Lind-Nielsen /"""\ Bergsoe Kollegiet 2104
- E-mail: jl@it.dtu.dk |o o| DK - 2850 Naerum
- --------------------------------ooo-U-ooo-------------------------------
- A Norton Commander for Unix ? FTP duroc.ds-data.dk /pub/uc
- ------------------------------------------------------------------------
-